import apiClient from './apiClient'

export const systemUserService = {
  // 获取系统用户列表（分页）
  getSystemUserList: async (params) => {
    return await apiClient.get('/system/users', { params })
  },

  // 根据ID获取系统用户
  getSystemUserById: async (id) => {
    return await apiClient.get(`/system/users/${id}`)
  },

  // 创建系统用户
  createSystemUser: async (userData) => {
    return await apiClient.post('/system/users', userData)
  },

  // 更新系统用户
  updateSystemUser: async (id, userData) => {
    return await apiClient.put(`/system/users/${id}`, userData)
  },

  // 删除系统用户
  deleteSystemUser: async (id) => {
    return await apiClient.delete(`/system/users/${id}`)
  },

  // 切换系统用户状态
  toggleSystemUserStatus: async (id) => {
    return await apiClient.put(`/system/users/${id}/status`)
  }
}